package com.zyl.pts.mapper;

import com.zyl.pts.domain.bean.Disease;
import com.zyl.pts.domain.bean.DiseaseRecord;
import com.zyl.pts.domain.dto.DRDTO.DRUpdateOrAddDTO;
import com.zyl.pts.domain.vo.DRVO.DRPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @version v1.0
 * @ProjectName: product_source
 * @Package: com.zyl.pts.mapper
 * @ClassName: DRMapper
 * @Description TODO()
 * @Author 翟玉龙
 * @Date 2024/11/19-19:54
 */
@Mapper
public interface DRMapper {

    /**
     * 查询指定id的病症信息
     * @param dId 病症id
     * @return {@link DiseaseRecord }
     */
    DiseaseRecord queryDiseaseById(Integer dId);

    /**
     * 查询所有病症类型信息
     * @return {@link List }<{@link Disease }>
     */
    List<Disease> queryAllDisease();

    /**
     * 分页多条件查询病症记录
     * @param drDId 病症id
     * @param drStatus 病症状态
     * @return {@link List }<{@link DRPageVO }>
     */
    List<DRPageVO> queryDiseaseByPageAndCondition(@Param("drDId") Integer drDId, @Param("drStatus") String drStatus);

    /**
     * 新增病症记录
     * @param diseaseRecord 病症记录
     * @return int
     */
    int addDiseaseRecord(DRUpdateOrAddDTO diseaseRecord);

    /**
     * 修改病症记录
     * @param diseaseRecord 病症记录
     * @return int
     */
    int updateDiseaseRecord(DRUpdateOrAddDTO diseaseRecord);

    /**
     * 根据记录ID删除病症记录
     * @param drId 记录id
     * @return int
     */
    int deleteDiseaseRecordById(Integer drId);

    /**
     * 根据病症id列表批量删除
     * @param drIds 病症id列表
     * @return boolean
     */
    boolean deleteDiseaseRecordByIds(List<Integer> drIds);
}
